package com.sun.service.Impl;

import com.sun.entities.Customer;
import com.sun.mapper.CustomerMapper;
import com.sun.service.CustomerService;
import com.sun.vo.CustomerVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @Author hugh.sun
 * @Date 2021/11/19 10:34
 */
@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;

    @Override
    public List<CustomerVo> findAllCustomer(CustomerVo customer) {

        List<CustomerVo> customers = customerMapper.findAllCustomer(customer);

        return customers;

    }

    @Override
    public List<Customer> findCustomerByNames(String[] usernames) {
        List<Customer> customerByNames = customerMapper.findCustomerByNames(usernames);
        return customerByNames;
    }

    @Override
    public void updateCustomer(Customer customer) {
        customerMapper.updateCustomer(customer);
    }


}
